SceneDataTransformer: support system and URL provided transformations - #1614
Merged
Merged
Conversation
…rmer
Adds SceneDataTransformer.setSystemTransformations so runtime transformations can
be combined with the user configured ones without replacing them. Entries are
tagged with an origin ('system' for panel provided, 'url' for url provided) and a
position, are replaced per origin so different providers do not clobber each
other, and can be filtered out via the exported isSystemTransformation guard
before persisting or editing. Also fixes variable interpolation dropping the
operator function from object form custom transformers.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 18, 2026
gtk-grafana
added a commit
to grafana/grafana
that referenced
this pull request
Aug 18, 2026
Adds `PanelPlugin.setDataTransformations(supplier)`, so a panel can declare the transformations it needs in order to render its data — extracting fields out of a JSON column, reshaping long frames into wide ones — without giving up field overrides or the user's own transformation pipeline. Prepended transformations run before every user transformation and before field overrides, so the fields they produce are matchable by overrides and targetable by the user; appended ones run after all of them. The supplier is handed the query result frames, so it can branch on frame shape or `meta`, and it is evaluated inside the pipeline rather than pushed from a panel render, which keeps it free of a render -> setState -> data -> render loop. They are carried in `SceneDataTransformer.transformations` tagged `origin: 'system'` and filtered out of editors and save models by the `isSystemTransformation` guard, so they are never persisted, never editable, and dashboard JSON is unchanged. The transformations tab shows them as read-only rows badged `System`, and the editors replay the prepended stage so each row is configured against the field shape it will actually receive. Gated behind the `grafana.panelPluginTransformations` feature toggle. No existing panel changes behavior. Requires @grafana/scenes 8.15.0 (grafana/scenes#1614). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gtk-grafana
reviewed
Aug 18, 2026
…ransform state on every call to setSystemTransformations
3 tasks
gtk-grafana
reviewed
Aug 18, 2026
Contributor
|
@dprokop I made a few minor changes while working on the grafana implementation and PoCs
Other then that everything looks good, marking as ready for review |
gtk-grafana
marked this pull request as ready for review
August 18, 2026 19:24
gtk-grafana
requested review from
Sergej-Vlasov and
harisrozajac
and removed request for
a team
August 18, 2026 19:24
dprokop
commented
Aug 20, 2026
gtk-grafana
added a commit
to grafana/grafana
that referenced
this pull request
Aug 20, 2026
…transformations
3 tasks
torkelo
reviewed
Sep 14, 2026
torkelo
reviewed
Sep 14, 2026
torkelo
reviewed
Sep 14, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 77c6cec. Configure here.
…er switching panels
Contributor
|
I think we're finally pretty close here, if anyone has a few minutes for final review I would greatly appreciate it! |
torkelo
previously approved these changes
Sep 16, 2026
mdvictor
reviewed
Sep 16, 2026
mdvictor
reviewed
Sep 16, 2026
mdvictor
previously approved these changes
Sep 16, 2026
mdvictor
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, left a couple of nits!
Contributor
|
🚀 PR was released in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds support for system transformations in scenes.
System transformations are currently:
SceneDataTransformerparent (e.g.VizPanel, gated withapplyPluginTransformationsstate flag)state.transformationsgetResolvedSystemTransformationsSceneDataTransformeractivationorigin(i.e.plugin) andposition(prepend,append)Also fixes variable interpolation dropping the
operatorfunction from object-form custom transformers.🤖 Generated with Claude Code
📦 Published PR as canary version:
9.0.0--canary.1614.35114143706.0✨ Test out this PR locally via:
npm install @grafana/scenes@9.0.0--canary.1614.35114143706.0 npm install scenes-app@9.0.0--canary.1614.35114143706.0 npm install @grafana/scenes-react@9.0.0--canary.1614.35114143706.0 # or yarn add @grafana/scenes@9.0.0--canary.1614.35114143706.0 yarn add scenes-app@9.0.0--canary.1614.35114143706.0 yarn add @grafana/scenes-react@9.0.0--canary.1614.35114143706.0